package com.h5ve.toolkit.entity;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.h5ve.data.entity.BaseEntity;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import java.util.ArrayList;
import java.util.List;

/**
 * 代码生成业务字段表 dev_group
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("dev_group_info")
public class GroupInfo extends BaseEntity {
    private static final long serialVersionUID = 1L;

    /**
     * 编号
     */
    @TableId
    private Long id;

    private Long applicationId;

    /**
     * 分组名称
     */
    private String name;

    /**
     * 父级编号
     */
    private Long parentId;

    /**
     * 祖级所有编号
     */
    private String parentIds;

    /**
     * 状态
     */
    private String status;

    /**
     * 排序
     */
    private Integer sort;
    /**
     * 子菜单
     */
    @TableField(exist = false)
    private List<GroupInfo> children = new ArrayList<GroupInfo>();
}
